﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package org.aswing.plaf.basic.background {
    import flash.display.*;
    import org.aswing.*;
    import flash.filters.*;
    import org.aswing.geom.*;
    import org.aswing.plaf.*;
    import org.aswing.graphics.*;

    public class ProgressBarBackground implements GroundDecorator, UIResource {

        protected var shape:Shape;

        public function ProgressBarBackground(){
            this.shape = new Shape();
        }
        public function getDisplay(_arg1:Component):DisplayObject{
            return (this.shape);
        }
        public function updateDecorator(_arg1:Component, _arg2:Graphics2D, _arg3:IntRectangle):void{
            var _local4:Orientable;
            var _local5:Boolean;
            var _local6:StyleTune;
            var _local7:Number;
            if ((((_arg1 is Orientable)) && (_arg1.isOpaque()))){
                _local4 = (_arg1 as Orientable);
                _local5 = (_local4.getOrientation() == AsWingConstants.VERTICAL);
                this.shape.graphics.clear();
                _local6 = _arg1.getStyleTune();
                _arg2 = new Graphics2D(this.shape.graphics);
                _arg3 = _arg3.clone();
                _local7 = 0;
                if (_local5){
                    _local7 = Math.floor((_arg3.width / 2));
                } else {
                    _local7 = Math.floor((_arg3.height / 2));
                };
                if (_local7 > _local6.round){
                    _local7 = _local6.round;
                };
                _arg2.fillRoundRect(new SolidBrush(_arg1.getBackground().changeAlpha(1)), _arg3.x, _arg3.y, _arg3.width, _arg3.height, _local7);
                this.shape.filters = [new GlowFilter(0, _local6.shadowAlpha, 5, 5, 1, 1, true)];
                this.shape.alpha = _arg1.getBackground().getAlpha();
            };
        }

    }
}//package org.aswing.plaf.basic.background 
